﻿// ===============================================================================
// 作者:吕艳阳
// 日期:2016-12-21 17:26
// 描述:
// 开发框架 版权所有
// ===============================================================================

using System.Collections.Generic;
using DotNet.Auth.Service;
using DotNet.Edu.Entity;
using DotNet.Edu.Utility;
using DotNet.Entity;
using DotNet.Helper;
using DotNet.Utility;

namespace DotNet.EduWebApi.Models
{
    public class CoursewareModel
    {
        /// <summary>
        /// 主键
        /// </summary>
        public string Id { get; set; }

        /// <summary>
        /// 课件名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 学时
        /// </summary>
        public int Period { get; set; }
        
        /// <summary>
        /// 学时字符串
        /// </summary>
        public string PeriodName
        {
            get { return DateTimeHelper.GetTimeStringHMS(Period); }
        }
        
        /// <summary>
        /// 课件类型 1.图片 2.视频
        /// </summary>
        public string CourseType { get; set; }

        /// <summary>
        /// 课件类型名称 1.图片 2.视频
        /// </summary>
        public string CourseTypeName => AuthService.DicDetail.GetNameByValue(EduDicConst.CourseType, CourseType);

        /// <summary>
        /// 验证对象
        /// </summary>
        public object Validate { get; set; }

        /// <summary>
        /// 检测对象
        /// </summary>
        public BoolMessage Check { get; set; }

        /// <summary>
        /// 培训类型参数
        /// </summary>
        public EduCategory Category { get; set; }

        /// <summary>
        /// 课件明细
        /// </summary>
        public List<CoursewareDetails> Details { get; set; }
    }
}